package com.jcl.cloud.services.crawler.search.controller;


import com.jcl.cloud.services.crawler.search.service.SearchTaskManagerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(
        value = {"/search-worker/api/v1"},
        produces = {"application/json"}
)
public class TaskController {


    @Autowired
    private SearchTaskManagerService searchTaskManagerService;


    @RequestMapping(
            value = {"/manager/tasks"},
            method = {RequestMethod.GET}
    )
    public void createTask(String crawlerId){
        this.searchTaskManagerService.createSearchTask(crawlerId);

    }







}
